package com.atguigu.gulimall.search.web;

import com.atguigu.gulimall.search.service.MallService;
import com.atguigu.gulimall.search.vo.SearchParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class SearchController {

    @Autowired
    private MallService mallService;

    /**
     * @param searchParam 页面可能传递的查询条件
     * @return 结果
     */
    @GetMapping("/list.html")
    public String listPage(SearchParam searchParam) {
        //TODO 业务处理
        Object result=mallService.search(searchParam);

        return "index";
    }
}
